class Report implements Comparable{
	
	static constraints = {
		id()
		reportSystem()
		reportName(maxSize:100,blank:false,nullable:false)
		reportTitle(maxSize:200,blank:false,nullable:false)
		showReport(maxSize:1,inList:["Y","N"])
		orderByClauseOverride(blank:true,nullable:true)
		designer(blank:true,nullable:true)
		userResponsible(blank:true,nullable:true)
		comments(blank:true,nullable:true,maxSize:400)
		reportEnded(maxSize:1,inList:["N","Y"])
		dateCreated()		
		reportParameters()
	}
	
	//SortedSet reportParameters
	static belongsTo = [reportSystem:ReportSystem]
	static hasMany = [reportParameters:ReportParameter]
	
	Integer id
	String 	reportName
	String 	reportTitle
	String 	showReport
	String	orderByClauseOverride
	String	designer
	String	userResponsible
	String 	comments
	String	reportEnded
	Date	dateCreated
	
	String toString(){
		reportTitle
	}
	
	int compareTo(obj){
		reportTitle.compareTo(obj.reportTitle)
	}

}
